{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-btn-group fl">
            <a href="{:url('admin/grade/add')}" class="layui-btn"><i class="fa fa-plus-circle"></i> 添加</a>
        </div>
        <div class="layui-btn-group fl">
        </div>
        <table class="layui-table layui-form">
            <thead>
            <tr>
                <th>班级</th>
                <th>路由</th>
                <th>图标</th>
                <th>开发可见</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {foreach name="grade" item="v" empty="$empty"}
            <tr>
                <td>{$v.title}<a href="{:url('admin/grade/add',['pid' => $v.id])}" data-toggle="modal" data-target="#ajaxModalLg"> <i class="icon ion-android-add-circle">+</i></a></td>
                <td></td>
                <td></td>
                <td> <input type="checkbox" name="dev" lay-skin="switch" lay-filter="*" lay-text="是|否" data-url="{:url('admin/grade/dev', ['id' => $v.id])}" {if $v.dev eq 1}checked="checked"{/if}></td>
                <td><input type="text" name="sort" value="{$v.sort}"></td>
                <td>
                    <input type="checkbox" name="status" lay-skin="switch" lay-filter="*" lay-text="启用|禁用" data-url="{:url('admin/grade/teacherstatus', ['id' => $v.id])}" {if $v.status eq 1}checked="checked"{/if}>
                    <a href="{:url('admin/grade/edit',['id' => $v.id])}">编辑</a>
                    <a href="{:url('admin/grade/del',['id' => $v.id])}">删除</a>
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>

    </div>
</div>
{/block}
